package net.miranti.opmov.client;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQuery;

@Entity
@NamedQuery(name = Airport.LIST_AIRPORTS_BY_CODE, 
		query=Airport.LIST_AIRPORTS_BY_CODE_QUERY)
public class Airport implements Serializable {
	public final static String LIST_AIRPORTS_BY_CODE = "LIST_AIRPORTS_BY_CODE";
	private final static String LIST_AIRPORTS_BY_CODE_QUERY = 
		"from Airport where code in (:codes)";
	
	@Id
	private String code;
	private String name;
	
	Airport(){
	}

	public Airport(String code, String name) {
		this.code = code;
		this.name = name;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
}
